Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run component updates in the background #135

Closed
wants to merge 4 commits into from

Conversation

oivindoh
Copy link
Contributor

@oivindoh oivindoh commented Sep 3, 2024

Currently, starting the image after bumping version numbers tends to be stuck for a very long time on component updates.

This PR runs these updates in the background rather than blocking startup waiting for the updates to be complete.

I don't really see a reason to wait for these to finish before proceeding with that we do after, and this change potentially reduces update downtime by a lot, depending on how time-consuming these processes are per update.

@ostefano
Copy link
Collaborator

ostefano commented Sep 3, 2024

Would it be possible to make it non-background the first time the image is run? (empty DB).

Reason is: enabling workflow modules will trigger a list of errors if this command is not run at least once.

Even better: make it optional (background option) via env var setting?

@ostefano ostefano added the enhancement New feature or request label Sep 3, 2024
@oivindoh
Copy link
Contributor Author

oivindoh commented Sep 3, 2024

@ostefano good catch!

I updated the PR to only run this in the background if the database was already initialised and then only if the BACKGROUND_COMPONENT_UPDATES env var is set

@oivindoh
Copy link
Contributor Author

oivindoh commented Sep 5, 2024

@ostefano I think that takes care of all issues while avoiding giving users a foot cannon 👍

@ostefano
Copy link
Collaborator

ostefano commented Sep 5, 2024

@oivindoh LGTM. Will merge as soon as I get some spare cycles to work on this 👍

@ostefano ostefano added the scheduled Will merge at the next opportunity label Sep 7, 2024
@ostefano
Copy link
Collaborator

ostefano commented Sep 8, 2024

Merged in other branch (required some refactory)

@ostefano ostefano closed this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scheduled Will merge at the next opportunity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants